import Vue from 'vue';
import axios from 'axios';
import VueAxios from 'vue-axios';

Vue.use(VueAxios, axios);

export const qianGet = function(url){

	return new Promise(function(resolve, reject){
		Vue.axios.get(url).then(function(response){
			console.log(response);
			resolve({
				success: 1,
				error: 0,
				data: response.data
			});
		}).catch(function(error){
			resolve({
				success: 0,
				error: 1,
				data: {}
			});
		});
	});

}
export const aaa = function(){
	Vue.axios.get('/api/user/company').then(function(response){
		console.log(111);
		console.log(response);
	}).catch(function(error){
		console.log(222);
		console.log(error);
	});
}
